#include <iostream>

using namespace std;

/*
 * 类可以作为另一个类的属性
 */

class A{
public:
    A(){
        cout << "A的构造函数" << endl;
    }
    ~A(){
        cout << "A的析构函数" << endl;
    }
};

class B{
public:
    A a;
    B(){
        cout << "B的构造函数" << endl;
    }
    ~B(){
        cout << "B的析构函数" << endl;
    }
};

void test01() {
    B b;
}

int main() {
    test01();
    return 0;
}
